package com.ruoyi.tbm.service.impl;

import java.util.Date;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.tbm.mapper.TbmManufacturerMapper;
import com.ruoyi.tbm.domain.TbmManufacturer;
import com.ruoyi.tbm.service.ITbmManufacturerService;

/**
 * 盾构机生产商Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-07-13
 */
@Service
public class TbmManufacturerServiceImpl implements ITbmManufacturerService 
{
    @Autowired
    private TbmManufacturerMapper tbmManufacturerMapper;

    /**
     * 查询盾构机生产商
     * 
     * @param id 盾构机生产商主键
     * @return 盾构机生产商
     */
    @Override
    public TbmManufacturer selectTbmManufacturerById(Integer id)
    {
        return tbmManufacturerMapper.selectTbmManufacturerById(id);
    }

    /**
     * 查询盾构机生产商列表
     * 
     * @param tbmManufacturer 盾构机生产商
     * @return 盾构机生产商
     */
    @Override
    public List<TbmManufacturer> selectTbmManufacturerList(TbmManufacturer tbmManufacturer)
    {
        return tbmManufacturerMapper.selectTbmManufacturerList(tbmManufacturer);
    }

    /**
     * 新增盾构机生产商
     * 
     * @param tbmManufacturer 盾构机生产商
     * @return 结果
     */
    @Override
    public int insertTbmManufacturer(TbmManufacturer tbmManufacturer)
    {
        tbmManufacturer.setCreateDate(new Date());
        return tbmManufacturerMapper.insertTbmManufacturer(tbmManufacturer);
    }

    /**
     * 修改盾构机生产商
     * 
     * @param tbmManufacturer 盾构机生产商
     * @return 结果
     */
    @Override
    public int updateTbmManufacturer(TbmManufacturer tbmManufacturer)
    {
        tbmManufacturer.setModifyDate(new Date());
        return tbmManufacturerMapper.updateTbmManufacturer(tbmManufacturer);
    }

    /**
     * 批量删除盾构机生产商
     * 
     * @param ids 需要删除的盾构机生产商主键
     * @return 结果
     */
    @Override
    public int deleteTbmManufacturerByIds(Integer[] ids)
    {
        return tbmManufacturerMapper.deleteTbmManufacturerByIds(ids);
    }

    /**
     * 删除盾构机生产商信息
     * 
     * @param id 盾构机生产商主键
     * @return 结果
     */
    @Override
    public int deleteTbmManufacturerById(Integer id)
    {
        return tbmManufacturerMapper.deleteTbmManufacturerById(id);
    }
}
